<script type="text/javascript" src="${base}/scripts/jsgl/xsjsd_detail.js"></script>
<div id="xsjsd_tabs" class="easyui-tabs" detail="true" data-options="fit:true,border:false">
    <div title="销售结算单">
    <table style="width: 99%;margin: 5px" class="tb tab-t t-bor">
        <input type="hidden" id="xsjsd_detail_id" value="${(xsjsd.id)!}"/>
        <col width="70px"/>
        <col width=""/>
        <col width="70px"/>
        <col width=""/>
        <col width="70px"/>
        <col width=""/>
        <tr>
            <th>结算单号：</th>
            <td colspan="5">
            ${(xsjsd.jsdh)!}
            </td>
        </tr>
        <tr>
            <th>公&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;司：</th>
            <td colspan="3">${(xsjsd.gs.jc)!}</td>
            <th>申&nbsp;请&nbsp;人：</th>
            <td>${(xsjsd.sqr.xm)!}</td>
        </tr>
        <tr>
            <th>客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户：</th>
            <td>${(xsjsd.glqy.qc)!}</td>
            <th>纳&nbsp;税&nbsp;&nbsp;号：</th>
            <td>${(xsjsd.glqy.qyfr.nsh)!}</td>
            <th>发票种类：</th>
            <td>
            <#if (xsjsd.fpzl)?exists && (xsjsd.fpzl)==0>增票</#if>
            <#if (xsjsd.fpzl)?exists && (xsjsd.fpzl)==1>普票</#if>
            <#if (xsjsd.fpzl)?exists && (xsjsd.fpzl)==2>其他</#if>
            <#if (xsjsd.fpzl)?exists && (xsjsd.fpzl)==3>另开票</#if>
            </td>
        </tr>
        <tr>
            <th>发票张数：</th>
            <td>${(xsjsd.fpzs)!}</td>
            <th>发票号码：</th>
            <td>${(xsjsd.hm)!}</td>
            <th>发票总额：</th>
            <td>${(xsjsd.fpze?string(",##0.00"))!}</td>
        </tr>
        <tr>
            <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
            <td colspan="5">${(xsjsd.bz)!}</td>
        </tr>
        <tr>
            <th>制&nbsp;单&nbsp;&nbsp;人：</th>
            <td>${(xsjsd.createUser.xm)!}</td>
            <th>制单时间：</th>
            <td colspan="3">${(xsjsd.dateCreated?datetime)!}</td>
        </tr>
    </table>
</div>
    <div title="结算单明细">
        <div id="xsjsd_jsdmx_table_toolbar" style="height:auto">
            <div class="PTools">
                <ul class="niu">
                <li><a name="export" href="javascript:void(0);" plain="true">导出</a></li>
                </ul>
            </div>
        </div>
    <table id="xsjsd_jsdmx_table" class="easyui-datagrid" url="${base}/xsgl/xsdgl/xsdmxSearchDetailList?xsjsdId=${(xsjsd.id)!}"
           rownumbers="true" toolbar="#xsjsd_jsdmx_table_toolbar" fit="true" fitColumns="false" showFooter="true">
        <thead>
        <tr>
            <th data-options="field:'yyxsdh',width:120,align: 'center'">合同子项号</th>
            <th data-options="field:'xsdh',width:120,align: 'center'">销售单号</th>
            <th data-options="field:'wzgg.name',width:100,align: 'center'">物资名称</th>
            <th data-options="field:'wzgg.ggxh',width:100,align: 'center'">规格型号</th>
            <th data-options="field:'wzgg.cz',width:30,align: 'right'">材质</th>
            <th data-options="field:'wzgg.dw',width:50,align: 'center'">单位</th>
            <th data-options="field:'hsj',width:100,formatter:formatJeForHtml2,align: 'right'">合同含税单价(元)</th>
            <th data-options="field:'sjdj',width:100,formatter:formatJeForHtml2,align: 'right'">实际单价(元)</th>
            <th data-options="field:'ck_sbsl',width:100,formatter:formatJeForHtml2,align: 'right'">数量</th>
            <th data-options="field:'sjghje',width:100,formatter:formatJeForHtml2,align: 'right'">实际购货总金额(元)</th>
            <th data-options="field:'txx',width:100,formatter:formatJeForHtml2,align: 'right'">贴现息(元)</th>
            <th data-options="field:'dlf',width:100,formatter:formatJeForHtml2,align: 'right'">代理费(元)</th>
            <th data-options="field:'zjzyf',width:100,formatter:formatJeForHtml2,align: 'right'">资金占用费(元)</th>
            <th data-options="field:'xkyh',width:100,formatter:formatJeForHtml2,align: 'right'">现款优惠(元)</th>
            <th data-options="field:'se',width:100,formatter:formatJeForHtml2,align: 'right'">赎货总金额(元)</th>
            <th data-options="field:'kpbhsj',width:100,align: 'right'">开票不含税单价(元)</th>
            <th data-options="field:'je',width:100,formatter:formatJeForHtml2,align: 'right'">金额(元)</th>
            <th data-options="field:'fpse',width:100,formatter:formatJeForHtml2,align: 'right'">税额(元)</th>
        </tr>
        </thead>
    </table>
</div>
    <div title="销售结算单打印">
        <div id="xsjsd_dy-toolbar">
            <div class="PTools">
                <ul class="niu">
                    <li><span class="xuan">选择打印机：</span>
                        <select class="ze" name="" style="">
                            <option>——默认——</option>
                        </select>
                    </li>
                    <li><a class="she" href="javascript:void(0);" onclick="checkIsInstall()">检查插件</a></li>
                    <li><a class="watch" href="javascript:void(0);" onclick="xsjsd_dyPrintPreview()">打印预览</a></li>
                <#--<li><a class="pen" href="javascript:void(0);" onclick="fp_xsjsd_dyPrint()">打印</a></li>-->
                </ul>
            </div>
            <div id="xsjsd_dy_id">
                <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
                    <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0
                           pluginspage="install_lodop32.exe"></embed>
                </object>
                <div id="xsjsd_dy_print_id" class="textcon">
                    <table id="xsjsd_dy_print_table" class="tb" style="width: 100%;font-size:13px;">
                        <colgroup>
                            <col width="10%;"/>
                            <col width="25%"/>
                            <col width="23%;"/>
                            <col width="12%"/>
                            <col width="12%;"/>
                            <col width="23%"/>
                        </colgroup>
                        <tbody>
                        <tr>
                            <th>客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户：</th>
                            <td>
                                <input  class="input-tian" readonly="readonly"
                                       value="${(xsjsd.glqy.qc)!}"/>
                            </td>
                            <td rowspan="2" colspan="2" style="text-align: center;font-size: 20px"> ${(xsjsd.gs.qc)!}销售结算单</td>
                            <th>结算单号:</th>
                            <td>
                                <input  class="input-tian" readonly="readonly"
                                       value="${(xsjsd.jsdh)!}"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>

                <div id="xsjsd_dy_xsjsd_id" class="textcon"></div>

                <div id="xsjsd_dy_detail_id" class="textcon">
                    <table class="tb" style="width: 100%;font-size:13px;">
                        <colgroup>
                            <col width="9%;"/>
                            <col width="20%"/>
                            <col width="10%;"/>
                            <col width="20%"/>
                            <col width="10%;"/>
                            <col width="20%"/>
                        </colgroup>
                        <tbody>
                        <tr>
                            <th style="font-size: 12px;">代垫费用:</th>
                            <td>
                                <input class="input-tian" readonly="readonly"
                                       value="${(xsjsd.ddfy)!}"/>
                            </td>
                            <th style="font-size: 12px;">发票号码:</th>
                            <td colspan="3">
                                <input class="input-tian" readonly="readonly"
                                       value="${(xsjsd.hm)!}"/>
                            </td>
                        </tr>
                        <tr >
                            <th style="font-size: 12px;">发票张数:</th>
                            <td>
                                <input class="input-tian" readonly="readonly"
                                       value="${(xsjsd.fpzs)!}"/>
                            </td>
                            <th style="font-size: 12px;">申请人：</th>
                            <td><input class="input-tian" readonly="readonly"
                                       value="${(xsjsd.sqr.xm)!}"/>
                            </td>
                            <th style="font-size: 12px;">制单人：</th>
                            <td><input class="input-tian" readonly="readonly"
                                       value="${(xsjsd.createUser.xm)!}"/>
                            </td>
                        </tr>
                        <tr>
                            <th></th>
                            <td colspan="1"></td>
                            <th></th>
                            <td colspan="1"></td>
                            <th></th>
                            <td>${(CurrentTime?string('yyyy-MM-dd HH:mm:ss'))!}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

